1. Field of the Invention
The present invention relates to an object tracking device used in an image pickup apparatus, such as a camera, to track an object, an object tracking method, and a storage medium storing an object tracking program, and more particularly to an object tracking device for use with automatized functions, such as the autofocus function and the exposure correction function, an object tracking method, and a storage medium storing an object tracking program.
2. Description of the Related Art
In general, an image pickup apparatus, such as a camera, is provided with an object tracking device for tracking an object. In the image pickup apparatus, an object image in a moving image is tracked according to the feature value of the object image.
For example, the feature value of an object image is calculated from a reference area, where the object image exists (i.e. the object image is formed), in a frame (preceding frame) preceding the current frame in time. Then, a predetermined search area in the present frame is searched for an area in which a feature value calculated therefrom is most approximate to the feature value calculated from the reference area in the preceding frame. Then, based on a result of the search, a reference area in the current frame is determined.
Further, in tracking an object, it is a known practice to move a reference area on a frame-by-frame basis and correct the location and size of the reference area so as to cope with deformation and turn of the object.
In Japanese Patent Laid-Open Publication No. 2009-225236, the reference area is corrected when the size of an object changes. For example, when the zoom magnification of an optical system is changed, the feature of the reference area is searched for while increasing or reducing the reference area according to the amount of change in the zoom magnification, whereby the reference area is corrected.
Further, in Japanese Patent Laid-Open Publication No. H05-30406, the reference area is corrected based on detection of motion vectors. For example, a plurality of auxiliary areas are set outside the reference area, and a motion vector is detected in association with each of the areas. Then, an auxiliary area where a motion vector approximately equal to a motion vector detected in association with the reference area was found is selected, and the reference area is relatively moved toward the selected auxiliary area, whereby the reference area is corrected.
In Japanese Patent Laid-Open Publication No. 2009-225236, however, when zoom operation is not performed, i.e. when an object changes its size as it comes closer to the camera, it is impossible to correct the reference area, so that the object as a tracking target cannot be tracked with high accuracy.
On the other hand, in Japanese Patent Laid-Open Publication No. H05-30406, although prevention of erroneous detection of a motion vector is disclosed, when the shape of an object is changed e.g. due to a turn of the object or a change in the size of the object, it is impossible to perform correction as desired, so that the object as a tracking target cannot be tracked accurately.